﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace VI.Chat.VIChatControl
{
    internal class ApplicationWrapper
    {
        public virtual HttpApplicationState Application
        {
            get;
            set;
        }

        public ApplicationWrapper()
        {
        }

        public ApplicationWrapper(HttpApplicationState application)
        {
            this.Application = application;
        }

        private const string keyOnlineUsers = "OnlineUsers";
        public virtual IList<string> OnlineUsers
        {
            get
            {
                if (Application[keyOnlineUsers] == null)
                {
                    Application[keyOnlineUsers] = new List<string>();
                }
                return (IList<string>)Application[keyOnlineUsers];
            }
        }
    }
}
